﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Unity;
using eCRAM.Model;
using eCRAM.Dao;

namespace eCRAM.Bll
{
    public class ActivityManager : IActivityManager
    {
        [Dependency]
        public IActivityRepository ActivityRepository { get; set; }
        
        public Activity GetFirtsActivity()
        {
            return ActivityRepository.GetTop(0, 1).First<Activity>();
        }

        public IList<String> GetAllActivityName()
        {
            return ActivityRepository.GetAllActivityName();
        }

        public List<Activity> GetAll()
        {
            return ActivityRepository.GetAll().ToList<Activity>();
        }

        public Activity GetActivityById(Guid id)
        {
            return ActivityRepository.GetById(id);
        }
    }
}
